package Sudoku;

import java.util.Scanner;

public class PlaySudoku {
    public static void main(String[] args) {
        Sudoku generator = new Sudoku();
        generator.generateSudoku(); //生成初始数独
        int numToRemove;
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入难度等级（难/中/易）: "); // 按照去除的数字个数的大小设置三种难度
        String difficulty = scanner.next();
        if (difficulty.equalsIgnoreCase("难")) {
            numToRemove = 50;
        } else if (difficulty.equalsIgnoreCase("中")) {
            numToRemove = 35;
        } else if (difficulty.equalsIgnoreCase("易")) {
            numToRemove = 20;
        } else {
            System.out.println("无效的输入！请重新运行并输入有效的难度等级。");
            return;
        }
        generator.removeNumbers(numToRemove); //按照难度去除数独里的数字
        generator.playGame(); // 开始游戏
    }
}